package com.sfeir.tv.client.mvc.framework;

import java.io.Serializable;

public class Model extends AbstractInitializable implements Channel
{
    protected Controller controller; 
    protected View view;

	public View getView() {
		return view;
	}

	public void setView(View view) {
		this.view = view;
	}
	
    public void setController(final Controller controller)
    {
        this.controller = controller;
    }

    public Controller getController()
    {
        return this.controller;
    }

    public void fireEvent( int eventType )
    {
        this.controller.fireEvent( new AppEvent( eventType, this ) );
    }

    public void register( int eventType, AppEventListener listener )
    {
        this.controller.register( eventType, listener );
    }

}
